結果

問題 No.544 Delete 7
ユーザー Mcpu3
提出日時 2018-06-29 16:43:41
言語 Java
(openjdk 23)
結果
AC  
実行時間 312 ms / 1,000 ms
コード長 390 bytes
コンパイル時間 1,996 ms
コンパイル使用メモリ 76,820 KB
実行使用メモリ 42,600 KB
最終ジャッジ日時 2024-11-21 16:48:52
合計ジャッジ時間 11,270 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 48
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class no544{
	public static void main(String[] args) { 
		Scanner stdIn=new Scanner(System.in);
		int n=stdIn.nextInt(),i,a,b,t=1;
		for(i=1;t!=0;i+=17) {
			a=i;
			b=n-i;
			t=0;
			do {
				if(a%10==7) t++;
				a/=10;
			}while(a!=0);
			do {
				if(b%10==7) t++;
				b/=10;
			}while(b!=0);
		}
		System.out.print(i-17+" "+(n-i+17));
	}
}
0