1 条题解
-
0
C :
#include <stdio.h> int main() { int i,a,b; for(i=1;;i++) { a=i/8/8/8; b=i/17/17; if(i%8==1&&i/8%8==1&&i/8/8%8==7&&i%17==4&&i/17%17==15&&2*a==b) { printf("%d",i); break; } } return 0; }
C++ :
#include<iostream> #include<iomanip> using namespace std; int main() { int i; for(i=0;;i++) if(((i*8+7)*8+1)*8+1==(34*i+15)*17+4) { printf("%d\n",(34*i+15)*17+4); break; } return 0; }
Pascal :
program liumohan; begin writeln(1993); end.
Java :
public class Main { public static void main(String[] args) { int n = 0; int m = 0; int q = 0; int a = 0; int c = 0; int d = 0; for(int i = 8; ; i++) { n = i % 8; m = i / 8 % 8; q = i / 8 / 8 % 8; a = i / 8 / 8 / 8; c = i % 17; d = i / 17 % 17; if(n == 1 & m == 1 & q == 7 & c == 4 & d == 15 & i / 17 / 17 == 2*a) { System.out.println(i); break; } } } }
Python :
i = 0 while(i <= 10000): i += 1 if(i % 8 == 1) and (i // 8 % 8 == 1) and (i // 8 // 8 % 8 == 7): a = i // 8 // 8 // 8 if((i % 17 == 4) and (i // 17 % 17 == 15)) and (i // 17 // 17 == a * 2): print(i)
- 1
信息
- ID
- 1519
- 时间
- 1000ms
- 内存
- 16MiB
- 难度
- (无)
- 标签
- 递交数
- 0
- 已通过
- 0
- 上传者