結果
問題 | No.682 Average |
ユーザー |
![]() |
提出日時 | 2018-05-25 09:47:42 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 132 ms / 2,000 ms |
コード長 | 419 bytes |
コンパイル時間 | 2,083 ms |
コンパイル使用メモリ | 74,044 KB |
実行使用メモリ | 41,592 KB |
最終ジャッジ日時 | 2024-06-28 17:52:17 |
合計ジャッジ時間 | 4,474 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 |
ソースコード
import java.util.Scanner; public class Main { public static void main(String[] args) { Main main=new Main(); main.run(); } void run() { Scanner sc=new Scanner(System.in); int A=sc.nextInt(); int B=sc.nextInt(); int counter=0; for(int i=A;i<=B;i++) { if((A+B+i)%3==0) { counter++; } } System.out.println(counter); } }